<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
<%@include file="/WEB-INF/taglibs/common/taglibs.jsp" %>

<head>
	<title><spring:message code="sp.createpayee.title" /></title>
	<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
	<link  rel="stylesheet" href="<c:url value="/css/styles.css"/>"/>
	<script src="<c:url value="/javascripts/common.js"/>" ></script>
</head>

<body><div class="page"><%@include file="../top_menu.jsp"%><table width=100%>
 <tr><td><c:import
	url="/WEB-INF/jsp/menu/payee_menu.jsp" /></td></tr>
	<tr>
		<td><%@include file="/WEB-INF/jsp/include/messages.jsp"%>
		<br />
		</td>
	</tr>
 
</table><div class="contentArea">
<table border=0 cellpadding=0 cellspacing=0 width=100%> 
<tr><td valign="top"> 
</td> 
<td valign="top">
    
    <table border=0 cellpadding=0 cellspacing=0 width="100%">
    <tr><td colspan="2">
		<%@include file="/WEB-INF/jsp/include/header.jsp"%>
		</td>
			</tr>
		<tr><td >
				<c:import url="/WEB-INF/jsp/include/provider.jsp" />
				</td>
				<td >
				&nbsp;
				</td>
			</tr>
    	<tr><td colspan="2" align="center"><h2><spring:message code="sp.createpayee.label.payeemanagement" /></h2></td></tr>
		<tr><td colspan="2">
			<form:form commandName="payeeProfile" method="post">
		<table width=70% class="formTable">

		<tr class="formHeader">
		    	<td colspan="2" align="left"><b><spring:message code="sp.createpayee.label.createpayeeprofile" /></b></td>
		    </tr>
		    
			<tr>
				<td colspan="2" align="center">
					<input type="submit" class='ui-button ui-state-default ui-corner-all' value="<spring:message code="sp.createpayee.button.save" />" />
					<input type="button" class='ui-button ui-state-default ui-corner-all' value="<spring:message code="sp.createpayee.button.cancel" />" onclick="location.href='view_payees.htm'" /> 
				</td>
			</tr>
			
		    <tr bgcolor="#E9E9E9">
		    	<td colspan="2" align="left"><b><spring:message code="sp.createpayee.label.payeeinformation" /></b>
		    	<input type="hidden" value="${payeeInfo.id}"   />
		    	<input type="hidden" value="${payeeInfo.level1UserID}"  />
		    		<input type="hidden" value="${payeeInfo.role.name}"  />
		    		<input type="hidden" value="${payeeInfo.id}" id="payeeId" />
		    		<input type="hidden" value="${payeeInfo.email}" />
		    		<input type="hidden" value="${payeeInfo.alternateEmail}"  />
		    	</td>
		    </tr>
		    		    
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.email" /></td>
		    	<td>${payeeInfo.email}</td>
		    </tr>
	
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.alternateemail" /> </td>
		    	<td>${payeeInfo.alternateEmail}</td>
		    </tr>
	
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.active" /></td>
		    	<td><input type="checkbox" value="${payeeInfo.enabled}" <c:if test="${payeeInfo.enabled == true}">checked</c:if> readonly="readonly" size="40" /></td>
		    </tr>
			
		    <tr bgcolor="#E9E9E9">
		    	<td colspan="2" align="left"><b><spring:message code="sp.createpayee.label.generalinformation" /></b></td>
		    </tr>
		    	    
		    <tr>
		    	<td><font color=red>*</font> <spring:message code="sp.createpayee.label.firstname" /></td>
		    	<td>
		    		<form:input path="firstName" size="40" />
		    		<div class="errors"><form:errors path="firstName"/></div>
		    	</td>
		    </tr>
	
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.middlename" /></td>
		    	<td><form:input path="middleName" size="40" /></td>
		    </tr>
	
		    <tr>
		    	<td><font color=red>*</font><spring:message code="sp.createpayee.label.lastname" /></td>
		    	<td>
		    		<form:input path="lastName" size="40" />
		    		<div class="errors"><form:errors path="lastName"/></div>
		    	</td>
		    </tr>
		    
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.efin" /></td>
		    	<td>
		    		<form:input path="efin" size="40" />
		    		<div class="errors"><form:errors path="efin"/></div>
		    	</td>
		    </tr>

		    <tr>
		    	<td><spring:message code="sp.createpayee.label.ssn" /></td>
		    	<td><form:input path="ssn" size="40" /></td>
		    </tr>
		    	
		    <tr>
		    	<td><font color=red>*</font><spring:message code="sp.createpayee.label.businessname" /></td>
		    	<td>
		    		<form:input path="businessName" size="40" />
		    		<div class="errors"><form:errors path="businessName"/></div>
		    	</td>
		    </tr>
		    
		   
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.pager" /></td>
		    	<td><form:input path="pager" size="40" /></td>
		    </tr>
		    
		    <tr bgcolor="#E9E9E9">
		    	<td colspan="2" align="left"><b><spring:message code="sp.createpayee.label.contactinformation" /></b></td>
		    </tr>
	
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.address" /></td>
		    	<td><form:input path="contactAddress" size="40" /></td>
		    </tr>
	
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.city" /></td>
		    	<td><form:input path="contactCity" size="40" /></td>
		    </tr>
		    
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.state" /></td>
		    	<td><form:input path="contactState" size="40" /></td>
		    </tr>
		    
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.country" /></td>
		    	<td><form:input path="contactCountry" size="40" /></td>
		    </tr>
	
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.zipcode" /></td>
		    	<td><form:input path="contactZip" size="40" /></td>
		    </tr>
		    	    
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.officephonenumber1" /></td>
		    	<td><form:input path="firstContactPhone" size="40" /></td>
		    </tr>
			
			<tr>
		    	<td><spring:message code="sp.createpayee.label.officephonenumber2" /></td>
		    	<td><form:input path="secondContactPhone" size="40" /></td>
		    </tr>
		    
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.faxnumber" /></td>
		    	<td><form:input path="contactFax" size="40" /></td>
		    </tr>
		    
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.cellnumber" /></td>
		    	<td><form:input path="contactCell" size="40" /></td>
		    </tr>
		    
		    <tr>
		    	<td><font color=red>*</font><spring:message code="sp.createpayee.label.cellphoneprovider" /></td>
<!--		    	<td><form:input path="contactCellProvider" size="40" /></td>-->
					<td>
						<form:select path="contactCellProvider"  >
							<form:option value="0"  label="Please Select Cell Provider" onclick="document.getElementById('otherCellProvider').disabled=true"></form:option>
							<form:option value="cp1" onclick="document.getElementById('otherCellProvider').disabled=true"></form:option>
							<form:option value="cp2" onclick="document.getElementById('otherCellProvider').disabled=true"></form:option>
							<form:option value="cp3" onclick="document.getElementById('otherCellProvider').disabled=true"></form:option>
							<form:option id="otherChoice" onclick="document.getElementById('otherCellProvider').disabled=false" value="" label="Other"></form:option>
						</form:select>
						<div class="errors"><form:errors path="contactCellProvider"/></div>
					</td>
					
		    </tr>
		    <tr>
		    	<td></td>
		    	<td><input type="text" id="otherCellProvider" disabled onchange="document.getElementById('otherChoice').value=this.value" /></td>
		    </tr>
		    
		    <tr bgcolor="#E9E9E9">
		    	<td colspan="2" align="left"><b><spring:message code="sp.createpayee.label.businessinformation" /></b></td>
		    </tr>

		    <tr>
		    	<td colspan="2">
<!--					<input type="checkbox" name="bsac" id="bsac" onclick="fillBusinessInfo();">Same as Contact Information</input>		    	-->
		    			<input type="radio" name="bsac" value="bsac1" id="bsac1" onclick="fillBusinessInfo();" ><spring:message code="sp.createpayee.label.sameascontactinformation" /></input>
		    			<br />
		    			<input type="radio" name="bsac" value="bsac2" id="bsac2" onclick="fillBusinessInfo();" ><spring:message code="sp.createpayee.label.sameasshippinginfo" /></input>
		    	</td>		    	
		    </tr>
		    		    
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.address" /></td>
		    	<td><form:input path="businessAddress" size="40" /></td>
		    </tr>
	
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.city" /></td>
		    	<td><form:input path="businessCity" size="40" /></td>
		    </tr>
		    
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.state" /></td>
		    	<td><form:input path="businessState" size="40" /></td>
		    </tr>
		    
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.country" /></td>
		    	<td><form:input path="businessCountry" size="40" /></td>
		    </tr>
		    
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.zipcode" /></td>
		    	<td><form:input path="businessZip" size="40" /></td>
		    </tr>
		    	    
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.phonenumber" /></td>
		    	<td><form:input path="businessPhone" size="40" /></td>
		    </tr>
		    
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.faxnumber" /></td>
		    	<td><form:input path="businessFax" size="40" /></td>
		    </tr>	    
		    
		    <tr bgcolor="#E9E9E9">
		    	<td colspan="2" align="left"><b><spring:message code="sp.createpayee.label.shippinginformation" /></b></td>
		    </tr>
		    	  
		    <tr>
		    	<td colspan="2">
					<input type="radio" name="ssac" value="ssac1" id="ssac1" onclick="fillShippingInfo();" ><spring:message code="sp.createpayee.label.sameascontactinformation" /></input>
					<br />
		    		<input type="radio" name="ssac" value="ssac2" id="ssac2" onclick="fillShippingInfo();" ><spring:message code="sp.createpayee.label.sameasbuisinessinfo" /></input>		    	
		    	</td>		    	
		    </tr>
		    		    	   
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.address" /></td>
		    	<td><form:input path="shippingAddress" size="40" /></td>
		    </tr>
	
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.city" /></td>
		    	<td><form:input path="shippingCity" size="40" /></td>
		    </tr>
		    
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.state" /></td>
		    	<td><form:input path="shippingState" size="40" /></td>
		    </tr>
		    
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.country" /></td>
		    	<td><form:input path="shippingCountry" size="40" /></td>
		    </tr>
		    
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.zipcode" /></td>
		    	<td><form:input path="shippingZip" size="40" /></td>
		    </tr>
		    	    
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.phonenumber" /></td>
		    	<td><form:input path="shippingPhone" size="40" /></td>
		    </tr>
		    
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.faxnumber" /></td>
		    	<td><form:input path="shippingFax" size="40" /></td>
		    </tr>
		    
		    <tr bgcolor="#E9E9E9">
		    	<td colspan="2" align="left"><b><spring:message code="sp.createpayee.label.preferences" /></b></td>
		    </tr>
		    
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.messagenotificationtype" /></td>
		    	<td>
					<input type="radio" name="msg" value=1 disabled="true"/><spring:message code="sp.createpayee.label.email" /><br/>
				    <input type="radio" name="msg" value=2 disabled="true"/><spring:message code="sp.createpayee.label.textmessages" /><br/>
				    <input type="radio" name="msg" value=3 disabled="true"/><spring:message code="sp.createpayee.label.both" /><br/>
				    <input type="radio" name="msg" value=4 disabled="true"/><spring:message code="sp.createpayee.label.none" /><br/>	    	
		    	</td>
		    </tr>
		    	    
		    <tr>
		    	<td><spring:message code="sp.createpayee.label.messagenotificationalert" /></td>
		    	<td>
					<input type="checkbox" name="msg1" value=1 disabled="true"/><spring:message code="sp.createpayee.label.everytimestatechanges" /><br/>
				    <input type="checkbox" name="msg1" value=2 disabled="true"/><spring:message code="sp.createpayee.label.onlywhencheckismailed" /><br/>
				    <input type="checkbox" name="msg1" value=3 disabled="true"/><spring:message code="sp.createpayee.label.whenmoneytransferedtodebitcard" /><br/>
				    <input type="checkbox" name="msg1" value=4 disabled="true"/><spring:message code="sp.createpayee.label.replytomessageissent" /><br/>	    	
		    	</td>
		    </tr>
		    
			<tr>
				<td colspan="2" align="center">
					<input type="submit" class='ui-button ui-state-default ui-corner-all' value="<spring:message code="sp.createpayee.button.save" />" />
					<input type="button" class='ui-button ui-state-default ui-corner-all' value="<spring:message code="sp.createpayee.button.cancel" />" onclick="location.href='view_payees.htm'" />
				</td>
			</tr>
			</table>
			</form:form>
			</td>
		</tr>		  	    	    
	</table>	
</td>
</tr>
</table>

<script language="javascript">
	function fillBusinessInfo() {
	
		var chk1 = document.getElementById("bsac1");
		var chk2 = document.getElementById("bsac2");
		
		if (chk1.checked) {
			document.getElementById("businessAddress").value = document.getElementById("contactAddress").value;
			document.getElementById("businessCity").value = document.getElementById("contactCity").value;
			document.getElementById("businessState").value = document.getElementById("contactState").value;
			document.getElementById("businessCountry").value = document.getElementById("contactCountry").value;
			document.getElementById("businessZip").value = document.getElementById("contactZip").value;
			document.getElementById("businessPhone").value = document.getElementById("firstContactPhone").value;
			document.getElementById("businessFax").value = document.getElementById("contactFax").value;			 
		} else if(chk2.checked){
			document.getElementById("businessAddress").value = document.getElementById("shippingAddress").value;
			document.getElementById("businessCity").value = document.getElementById("shippingCity").value ;
			document.getElementById("businessState").value = document.getElementById("shippingState").value;
			document.getElementById("businessCountry").value = document.getElementById("shippingCountry").value;
			document.getElementById("businessZip").value = document.getElementById("shippingZip").value;
			document.getElementById("businessPhone").value = document.getElementById("shippingPhone").value;
			document.getElementById("businessFax").value = document.getElementById("shippingFax").value;
		}
	}
	
	function fillShippingInfo() {
		var chk1 = document.getElementById("ssac1");
		var chk2=document.getElementById("ssac2");
		//alert(chk);
		if (chk1.checked) {
			document.getElementById("shippingAddress").value = document.getElementById("contactAddress").value;
			document.getElementById("shippingCity").value = document.getElementById("contactCity").value;
			document.getElementById("shippingState").value = document.getElementById("contactState").value;
			document.getElementById("shippingCountry").value = document.getElementById("contactCountry").value;
			document.getElementById("shippingZip").value = document.getElementById("contactZip").value;
			document.getElementById("shippingPhone").value = document.getElementById("firstContactPhone").value;
			document.getElementById("shippingFax").value = document.getElementById("contactFax").value;			 
		} else if(chk2.checked) {
			document.getElementById("shippingAddress").value = document.getElementById("businessAddress").value;
			document.getElementById("shippingCity").value = document.getElementById("businessCity").value;
			document.getElementById("shippingState").value = document.getElementById("businessState").value;
			document.getElementById("shippingCountry").value = document.getElementById("businessCountry").value;
			document.getElementById("shippingZip").value = document.getElementById("businessZip").value;
			document.getElementById("shippingPhone").value = document.getElementById("businessPhone").value;
			document.getElementById("shippingFax").value = document.getElementById("businessFax").value;
		}
	}	
</script>
</div></div>
<%@include file="/WEB-INF/jsp/include/footer.jsp"%></body>
</html>	
